using System;
using System.Collections.Generic;
using System.Text;

namespace Elte.SqlSpIdx.Utils
{
    class LexicalComparer : IComparer<double[]>
    {
        #region IComparer<double[]> Members

        public int Compare(double[] x, double[] y)
        {
            double a, b;
            for (int i = 0; i < x.Length; i++)
            {
                a = (double)Math.Floor(x[i]);
                b = (double)Math.Floor(y[i]);
                if (a < b) return -1;
                if (a > b) return 1;
            }
            return 0;            
        }

        #endregion
    }
}
